﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TierApplication;
using System.Data;
using System.Text;

public partial class ForeProgram_shopSaveOrder : System.Web.UI.Page
{
    #region Page_Load
    /// <summary>
    /// Page_Load
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblOrderID.Text = Context.Items["OrderId"].ToString();
            T_ORDER order = new T_ORDER(lblOrderID.Text);
            if (order != null)
            {
                if(order.TOTALFEE.HasValue)
                    lblbankPay.Text = "￥" + order.TOTALFEE.ToString();
            }
        }
    }
    #endregion

    #region 邮件发送
    private void SendMail()
    {
        T_ACCOUNT account = new T_ACCOUNT();
        DataSet ds = account.GetAccount(Security.GetAccountId());
        StringBuilder sb = new StringBuilder();
        string UserName = string.Empty;
        string Mail = string.Empty;
        if (ds != null && ds.Tables.Count != 0 && ds.Tables[0].Rows.Count != 0)
        {
            Mail = ds.Tables[0].Rows[0]["EMAIL"].ToString();
        }
        T_MAILSENDREC ent = new T_MAILSENDREC();
        ent.ACCOUNTID = Security.GetAccountId();
        ent.MAILCONTENT = WebPath.GetSendMailContext(lblOrderID.Text,Security.GetAccountId());
        ent.MAILCREATEDATE = DateTime.Now;
        ent.MAILSUB = "您在易迅的订单" + lblOrderID.Text + " -- 订单生成";
        ent.RECEIVER = Mail;
        string result = string.Empty;
    }
    #endregion
}